package peter.models.skill;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity // This tells Hibernate to make a table out of this class
// @javax.persistence.Table(catalog="xx",name="tableName",schema="xx",uniqueConstraints={ @UniqueConstraint(columnNames={"xx","xx"})})
public class Skill {
    @Id
    @Column(name = "id", columnDefinition="int(11) COMMENT '主键，自动生成'")
    @GeneratedValue(strategy=GenerationType.AUTO)
    private Integer id;
    @Basic
    @Column(name = "name", unique=true, nullable=false, columnDefinition="varchar(64) COMMENT '技能名'")
    private String name;
    @Basic
    @Column(name = "description", columnDefinition="varchar(255) COMMENT '技能描述'")
    private String description;
    @Basic
    @Column(name = "level", nullable=false, columnDefinition="int(11) default 0 COMMENT '技能级别'")
    private Integer level = 0;
    @Basic
    @Column(name = "target", nullable=false, columnDefinition="int(11) default 0 COMMENT '技能目标'")
    private Integer target = 0;
    @Basic
    @Column(name = "weight", nullable=false, columnDefinition="int(11) default 1 COMMENT '技能权重：重要性'")
    private Integer weight = 1;
    @Basic
    @Column(name = "sort", nullable=false, columnDefinition="int(11) default 0 COMMENT '手动排序'")
    private Integer sort = 0;
    @Basic
    @Column(name = "tag", columnDefinition="varchar(255) COMMENT '技能标签'")
    private String tag;
    @Basic
    @Column(name = "favorite", nullable=false, columnDefinition="int(11) default 0 COMMENT '技能标签'")
    private Integer favorite = 0;

    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String label) {
        this.description = label;
    }

    public Integer getLevel() {
        return this.level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Integer getTarget() {
        return this.target;
    }

    public void setTarget(Integer target) {
        this.target = target;
    }

    public Integer getWeight() {
        return this.weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    public Integer getSort() {
        return this.sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getTag() {
        return this.tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public Integer getFavorite() {
        return this.favorite;
    }

    public void setFavorite(Integer favorite) {
        this.favorite = favorite;
    }

    @Override
    public String toString() {
        return "Skill [id=" + this.id + ", name=" + this.name + ", description=" + this.description + ", level=" + this.level + ", weight="
                        + this.weight + ", sort=" + this.sort + ", tag=" + this.tag + ", favorite=" + this.favorite + "]";
    }

}
